home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / ReplaceAttributes 1.0 (US) / ReplaceAttributes 1.0 (US).rsrc / HELP_5635 < prev    next >
Encoding:
Text File  |  1996-01-09  |  3.0 KB  |  62 lines

  1.  
  2.  
  3.                                       ReplaceAttributes 1.0
  4.  
  5.                                           by Frédéric RINALDI
  6.  
  7.  
  8. DESCRIPTION
  9.   ReplaceAttributes allows to quickly change text attributes (font, style, size) within a field.
  10.  
  11. SYNTAX
  12. ReplaceAttributes <field descriptor>,<current attributes>,<new attributes>
  13.                             [,<start char>[,<end char>]]
  14.  
  15. PARAMETERS
  16.    <field descriptor> is a litteral string containing any valid field descriptor (even lying on another card than current one). Don't forget to enclose it in quotes, in order for it not to be interpreted by HyperCard when the XCMD is called. If you want to use the field name, you will use :
  17.  
  18.     ReplaceAttributes "cd fld" && quote & "Name" & quote
  19.  
  20.    <current attributes> and <new attributes> define the current and new text attributes. They can contain a single attribute, or any combination of the three allowed (font, style, size) separated by semicolon (since style uses commas as separator). The order of the attributes must be the same in both parameters, their type is automatically recognized by the XCMD:
  21.    font is the name of any installed font
  22.    style can be plain, or any combination of bold, italic, outline, underline, shadow, condense, extend, grouped separated by comma.
  23.    size is an integer > 0
  24.  
  25.    <start char> and <end char> are two optional integers, defining the starting and ending target characters of the field.
  26.  
  27.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  28.  
  29. USING
  30.    The XCMD changes the style of text contained in the designed field.
  31.  
  32.    Examples of valid calls:
  33.      ReplaceAttributes "cd fld 1","geneva","times"
  34.      ReplaceAttributes "fld 5","geneva;italic,bold","geneva;bold"
  35.      ReplaceAttributes "cd fld id 2","12","18"
  36.      ReplaceAttributes "fld 1","9;italic;times","10;underline;courier"
  37.  
  38.  
  39. ERRORS
  40. If an error occurs, ReplaceAttributes can return :
  41.      "Error : Parameter is not a field descriptor"
  42.      "Error : Field not found"
  43.      "Error : Unrecognized attribute"
  44.      "Error : ReplaceAttributes requires HC 2.0"
  45.      "Error : Missing or empty parameter(s)"
  46.      "Error : Parameter 4 & 5 must be integer > 0"
  47.      "Error : End char must be ≥ start char"
  48.      "Error : Old and new attributes don't match"
  49.      "Error : Couldn't get field"
  50.  
  51. HISTORY
  52. 1.0                                                                  10/28/93
  53. • First public release
  54. --------------------------------------------------------------------
  55.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  56.  
  57.           ReplaceAttributes XCMD, © Frederic Rinaldi, 1989…1993.
  58.  
  59.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  60.  
  61. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  62.                Internet : RINALDI1@APPLELINK.APPLE.COM